/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package perso;

import carte.Carte;
import ctrl.command.Command;
import java.util.ArrayList;

/**
 *
 * @author Administrateur
 */
public abstract class Personnage {

    public int id;
    public int px;
    public int py;
    private String image;
    public Carte carte;
    public String name;
    

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Personnage(int id,Carte carte) {
        this.carte = carte;
        this.id = id;
    }

    public abstract Command doAction();

    public void kill(ArrayList<Personnage> listPerso) {
        listPerso.remove(this);
        carte.getPerso()[px][py]=null;
    }

    public abstract void createPerso(ArrayList<Personnage> listPerso, int endPosX, int endPosY);

    public abstract void convert(ArrayList<Personnage> listPerso);
    
    public abstract boolean endOfGame(ArrayList<Personnage> listPerso);


}
